package edu.biwu.filter;

import jakarta.servlet.*;

import java.io.IOException;

public class FilterDemo02 implements Filter{
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("FilterDemo02开始执行"+request+"...."+response);
        chain.doFilter(request, response);
        System.out.println("FilterDemo02结束执行");

        response.setContentType("text/html;charset=utf-8");
        response.getWriter().write("FilterDemo02的响应");
    }
}
